//引入封装好的类
import http from '@/request'
/* ==========================菜单管理接口============================== */
// 菜单添加的接口
export const menuAdd = (data: Object) => http.post('/menuadd', data)
// 获取菜单列表的接口
export const menuList = (params: Object) => http.get('/menulist', params)
// 菜单删除的接口
export const menuDel = (data: Object) => http.post('/menudelete', data)
// 菜单编辑的接口
export const menuEdit = (data: Object) => http.post('/menuedit', data)
// 获取一条菜单信息接口
export const menuLook = (params: Object) => http.get('/menuinfo', params)
/* ==========================角色管理接口============================== */
// 角色添加接口
export const roleAdd = (data: Object) => http.post('/roleadd', data)
// 获取角色列表接口
export const roleList = (params: Object) => http.get('/rolelist', params)
// 获取一条角色信息接口
export const roleLook = (params: Object) => http.get('/roleinfo', params)
// 角色删除的接口
export const roleDel = (data: Object) => http.post('/roledelete', data)
// 角色编辑的接口
export const roleEdit = (data: Object) => http.post('/roleedit', data)
/* ===========================管理员管理接口================================ */
// 管理员添加接口
export const userAdd = (data: Object) => http.post('/useradd', data)
// 获取管理员总数接口（用于计算分页）
export const userCount = () => http.get('/usercount')
// 获取管理员列表接口（分页）
export const userList = (params: Object) => http.get('/userlist', params)
// 获取一条管理员信息接口
export const userLook = (params: Object) => http.get('/userinfo', params)
// 管理员修改接口
export const userEdit = (data: Object) => http.post('/useredit', data)
// 管理员删除接口
export const userDel = (data: Object) => http.post('/userdelete', data)
// 管理员登录接口
export const userLogin = (data: Object) => http.post('/userlogin', data)
